package edu.rpi.bt.client.domain;

import java.io.Serializable;

import com.apress.progwt.client.domain.Loadable;

import edu.rpi.bt.client.domain.generated.AbstractDestination;
/**
 * 
 * @author Ashoo
 * 
 *         
 */
public class Destination extends AbstractDestination implements Serializable, Loadable{
    private String ustring;
    public Destination() {

    }

    public Destination(long id) {
        setId(id);
    }

    public Destination(String name) {
        setName(name);
    }
    /*
    @Override
    public List<Destination> getLocations(){
        Destination
        for (Destination destination : getLocations()) {
            rtn.add(application.getAppAndScore(getRatingTypes(), this));
        }
        return 
    }
    */
    @Override
    public String toString() {
        return "Destination:" + getId() + ":name:" + getName();
    }
    

    public String getFullAddress() {
        StringBuffer sb = new StringBuffer();
        if(getAddress()!=null){
            sb.append(getAddress());
            sb.append(" ");
        }
        if(getCity()!=null){
            sb.append(getAddress());
            sb.append(", ");
        }
        if(getState()!=null){
            sb.append(getAddress());
            sb.append(" ");
        }
        if(getZip()!=null){
            sb.append(getAddress());
            sb.append(" ");
        }
        return sb.toString();
     }

    public void setUstring(String ustring) {
        this.ustring = ustring;
    }

    public String getUstring() {
        return ustring;
    }
    
}
